package com.ruoyi.merchant.rabbitmq.service;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@SuppressWarnings(value = { "unchecked", "rawtypes" })
@Component
public class SendMQService {
    @Autowired
    private RabbitTemplate rabbitTemplate;
    public void send(String message) {
        rabbitTemplate.convertAndSend("order_ttl_exchange", "order.add", message);
    }
}
